package com.ostrich.a2104gao5.test22

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/17 13:10
 * @Description : IFoodEffect
 *
 * 泛型接口
 */
interface IFoodEffect<T> {
    fun effect(item:T)
}
class Banana:IFoodEffect<String>{
    override fun effect(item: String) {
        println(item)
    }
}
fun main(){
    Banana().effect("常食香蕉有益于大脑，预防神经疲劳，还有润肺止咳、防止便秘")
}